package com.hxkj.client.service;

import com.hxkj.domain.po.Companyinfo;
import com.hxkj.domain.po.Templet;
import com.hxkj.domain.po.TemplteTree;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author YAOSY
 * @create 2018年6月14日17:14:56
 * @desc 合作公司对外接口
 **/

@FeignClient(name = "cms-management")
public interface CompanyInfoServiceClient {


    /**
     * 获取合作公司列表
     *
     * @param parameterDataStruct 合作公司信息 和 分页信息
     * @return 翻页数据
     * @throws Exception
     */
    @RequestMapping(value = "/company/getlist", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    public ResultPageStruct<Companyinfo> getList(@RequestBody ParameterDataStruct<Companyinfo> parameterDataStruct)
            throws Exception;


    /**
     * 新增合作公司
     *
     * @param companyinfo 合作公司信息
     * @throws Exception
     */
    @RequestMapping(value = "/company/save", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Companyinfo> save(@RequestBody Companyinfo companyinfo) throws Exception;


    /**
     * 删除合作公司
     *
     * @param companyinfo 目合作公司信息
     * @throws Exception
     */
    @RequestMapping(value = "/company/remove", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultMessageStruct remove(@RequestBody Companyinfo companyinfo) throws Exception;


    /**
     * 获取单条合作公司数据
     *
     * @param companyinfo
     * @throws Exception
     */
    @RequestMapping(value = "/company/get", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Companyinfo> get(@RequestBody Companyinfo companyinfo) throws Exception;


    /**
     * 保存单条合作公司
     *
     * @param companyinfo
     * @throws Exception
     */
    @RequestMapping(value = "/company/modify", method = RequestMethod.POST,consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modify(@RequestBody Companyinfo companyinfo) throws Exception;


    /**
     * 合作公司排序
     *
     * @param companyinfo 站点id 数组信息
     * @throws Exception
     */
    @RequestMapping(value = "/company/sort", method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    public ResultMessageStruct sort(@RequestBody Companyinfo companyinfo) throws Exception;


}
